#include <stdio.h>

int collect(char *str);

int main() {

	char str[1024];
	gets(str);

	printf("%d\n", collect(str));

	return 0;
}

int collect(char *str) {
	int count = 0;
	int i = -1;
	while (i++, str[i] != '\0')
		if (str[i] >= '0'&& str[i] <= '9')
			count++;
	return count;
}
